<?php
require 'Model.php';
class CommentModel extends Model{
	function __Construct(){
		parent::__Construct();
		$this->mod='comments';
	}
	function getList(){
			/*$data = array(
			array('uname'=>'jason','gender'=>'男'),
			array('uname'=>'jack','gender'=>'男')
			);*/
			$sql = "select * from {$this->mod}";
			$data = $this->conn->query($sql);
			return $data;
		}
		
		function getUserByID($id){
			$sql = "select * from comments where cid=".$id;
			$result = $this->conn->query($sql);
			return $result;
		}
		
			function delete($id)
			{
				$sql = "delete from comments where cid=".$id;
				$result = $this->conn->query($sql);
				return $result;
			}




		}
		?>